<!DOCTYPE html>
<html xmlns:layout="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
	layout:decorate="~{common/layout}">

<head>
	<meta charset="UTF-8">
	<title>血糖记录管理系统</title>
	<style scoped lang="less">
	.el-collapse-item-title {
	    width: 90%;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    white-space: nowrap;
	}
	.custom-title {
	    margin-right: 4px;
	    vertical-align: middle;
	    margin: auto;
	  }
	</style>
</head>

<body>
	<div layout:fragment="fragment_body">
		<van-row>
			<van-cell-group>
			  <van-cell value=" " is-link>
			  <template #title>
			    <van-image
				  round
				  cover
				  width="5rem"
				  height="5rem"
				  :src="accountInfo.accountLogo"
				>
				<template v-slot:error>加载失败</template>
				</van-image>
			  </template>
			  <template #right-icon>
			    <div class="custom-title">
					<a href="/user/login" v-if="!accountInfo.accountId">请登录</a>
					<span v-if="accountInfo.accountId">{{accountInfo.accountRole ==0?'用户：':'专家：'}}{{accountInfo.accountNick}}</span>
				</div>
			  </template>
			</van-cell>
			</van-cell-group>
			<van-cell-group>
			  <van-cell icon="friends-o" is-link url="/user/info" title="个人信息" ></van-cell>
			</van-cell-group>
			<van-cell-group>
			  <van-cell icon="share-o" is-link url="/user/myShare" title="我的分享" ></van-cell>
			</van-cell-group>
			<van-cell-group>
			  <van-cell icon="chat-o" is-link url="/user/guidance" title="用户咨询" v-if="accountInfo?.accountRole*1 === 0" ></van-cell>
			</van-cell-group>
			<van-cell-group>
			  <van-cell icon="chat-o" is-link url="/user/guidance" title="专家咨询" v-if="accountInfo?.accountRole*1 === 1" ></van-cell>
			</van-cell-group>
			<van-cell-group>
			  <van-cell icon="underway-o" is-link url="/user/record" title="血糖记录" v-if="accountInfo?.accountRole*1 === 0" ></van-cell>
			</van-cell-group>
			<van-cell-group>
			  <van-cell icon="close" is-link url="/user/logout" title="退出登录" v-if="accountInfo.accountId" ></van-cell>
			</van-cell-group>
		</van-row>
	</div>
</body>
<script type="text/javascript" layout:fragment="fragment_script">
	let vueData = {
		activeMenu: 'my',
		sugars: [],
	}
	let vueMethods = {
		onSearch(){
			
		},
		onClickTab(name, title) {
			let that = this
	    },
	    handleChange(val) {
        	console.log(val);
      	},
		getRecords() {
			let that = this
			let pp = {
				accountId: that.ACCOUNTID
			}
			postRequst('/user/getSugarRecords', pp, true).then(function (resp) {
				that.sugars = resp.rows
			})
		},
	}
	function vueCreated() {
		let that = this
		
	}
</script>

</html>